import request from '@/utils/request'

// 封装物业费管理页面渲染接口
export const getListCondoFeeAPI = (params) => {
  return request.get('/park/propertyfee', { params })
}

// 物业费-预算金额
export const getMountAPI = (data) => {
  return request({
    url: '/park/propertyfee/pre/payment',
    method: 'post',
    data: {
      buildingId: data.buildingId,
      startTime: data.startTime,
      endTime: data.endTime
    }
  })
}

// 添加
export const addCondoFeeAPI = (data) => {
  // return request.post('/park/propertyfee', data)
  return request({
    url: '/park/propertyfee',
    method: 'post',
    data: {
      enterpriseId: data.enterpriseId,
      buildingId: data.buildingId,
      startTime: data.startTime,
      endTime: data.endTime,
      paymentAmount: data.paymentAmount,
      paymentMethod: data.paymentMethod
    }
  })
}

// 物业费-查看账单详情
export const examineListAPI = (id) => {
  return request.get(`park/propertyfee/${id}`)
}

// 删除
export const getDelCondoFeeAPI = (id) => {
  return request.delete(`/park/propertyfee/${id}`)
}
